<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:body>
        <ui:composition template="template.xhtml">
            <ui:define name="content">
                <h:panelGroup>
                    <h:form id="add">
                        <h:inputText value="#{kalenderPM.week}" id="kalenderName" />
                    </h:form>
                </h:panelGroup>
       
                
                
                
                
                <h:form>
                    <p:dialog widgetVar="eventDialog" header="Neuer Termin" showEffect="clip" hideEffect="clip">
                        <h:panelGrid id="eventDetails" columns="2">
                            <h:outputLabel for="title" value="Beschreibung:" />
                            <p:inputText id="title" value="#{scheduleController.event.title}" required="true"/>

                            <h:outputLabel for="from" value="Von:" />
                            <p:inputMask id="from" value="#{scheduleController.event.startDate}" mask="99/99/9999">
                                <f:convertDateTime pattern="dd/MM/yyyy" />
                            </p:inputMask>

                            <h:outputLabel for="to" value="Bis:" />
                            <p:inputMask id="to" value="#{scheduleController.event.endDate}" mask="99/99/9999">
                                <f:convertDateTime pattern="dd/MM/yyyy" />
                            </p:inputMask>

                            <h:outputLabel for="allDay" value="Ganztägig:" />
                            <h:selectBooleanCheckbox id="allDay" value="#{scheduleController.event.allDay}" />

                            <p:commandButton type="reset" value="Reset" />
                            <p:commandButton value="Bestätigen" actionListener="#{scheduleController.addEvent}" oncomplete="myschedule.update();eventDialog.hide();"/>
                        </h:panelGrid>
                    </p:dialog>
                    </h:form>
                
                
              <h:form>  
                  <h:commandButton value="Logout" action="#{kalenderPM.logout()}" rendered="#{kalenderPM.loggedIn}"/>   
              </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
